import 'package:flutter/material.dart';

void main() {
  runApp(const MaterialApp(home: Main()));
}

class Main extends StatelessWidget {
  const Main({super.key});

  @override
  Widget build(BuildContext context) {
    return Center(
      
      child: Container(
        width: 300,
        height: 300,
        // color: const Color.fromARGB(255, 252, 197, 193),
        //padding: const EdgeInsets.all(20),
        //padding: const EdgeInsets.symmetric(vertical: 20),// 上下间
        // padding: const EdgeInsets.fromLTRB(20, 20, 20, 20),// 上下左右
        // padding: const EdgeInsets.fromLTRB(20, 0, 20, 0),// 左右
        padding: const EdgeInsets.only(top: 20),
        decoration: BoxDecoration(
            color: Colors.green,
            border: Border.all(
              color: const Color.fromARGB(193, 0, 0, 0),
              width: 5,
            ),
            // borderRadius: BorderRadius.circular(20), // 圆角
            shape: BoxShape.circle, // 圆形
            gradient:
                const LinearGradient(colors: [Colors.red, Colors.blue]), // 渐变
            boxShadow: const [
              BoxShadow(
                color: Color.fromARGB(255, 0, 0, 0),
                offset: Offset(5, 5),
                blurRadius: 10,
              )
            ]),
        alignment: Alignment.center, // 水平居中
        // transform: Matrix4.rotationZ(-0.3), // 旋转
        //文本组件
        child: Container(
          color: const Color.fromARGB(0, 0, 140, 255),
          margin: const EdgeInsets.all(20),
          // transform: Matrix4.rotationZ(0.3), // 旋转

          child: const Text(
            '《春宵》 苏轼\n 朝代：宋\n 春宵一刻值千金，\n 花有清香月有阴。\n歌管楼台声细细，\n 秋千院落夜沉沉。',
            maxLines: 3, // 最大行数
            overflow: TextOverflow.ellipsis, //省略号
            style: TextStyle(
              color: Colors.white,
              fontSize: 20,
              decorationThickness: 2, // 下划线宽度
              decoration: TextDecoration.lineThrough, // 删除线
              //decoration: TextDecoration.underline, // 下划线
              decorationStyle: TextDecorationStyle.wavy, // 下划线样式
              decorationColor: Color.fromARGB(255, 54, 244, 184), // 下划线颜色
              height: 1.5, // 行高
              letterSpacing: 5, // 字间距
              wordSpacing: 5, // 单词间距
              fontWeight: FontWeight.bold, // 粗体
              fontStyle: FontStyle.italic, // 斜体
              backgroundColor: Colors.yellow, // 背景色
              shadows: [
                Shadow(
                  color: Colors.red,
                  offset: Offset(5, 5),
                  blurRadius: 10,
                )
              ], // 阴影
              fontFamily: 'Courier New', // 字体
              fontFeatures: [
                FontFeature.enable('smcp'),
                FontFeature.enable('sups'),
              ], // 字形特性
              textBaseline: TextBaseline.alphabetic, // 基线
            ),
          ),
        ),
      ),
    );
  }
}
